<?php

namespace app\index\controller;

use think\Request;

/**
 *  购物车操作
 */
class Cart extends Base
{
    // 返回购物车信息
    public function index()
    {
    	$map = [];
    	$map['uid'] = $this->user['uid'];
        $list = model('Cart')->getList($map);

        $this->result($list);
    }


    

    // 修改购物车
    public function update()
    {
        $post = input('post.');
        $post['uid'] = $this->user['uid'];
        $rst = model('Cart')->addInfo($post);
        $this->success($rst);
    }

    // 清空购物车
    public function delete()
    {
        $post = input('post.');
        
    }

}
